package com.starrin.trashtalk.util;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

/**
 * Created by larsstarrin on 14/10/14.
 */
public class FacesMessageUtil {
    public static void addError(String message) {
        FacesMessage msg = new FacesMessage(message,"");
        msg.setSeverity(FacesMessage.SEVERITY_ERROR);
        FacesContext.getCurrentInstance().addMessage(null, msg);
    }

    public static void addInfo(String message){
        FacesMessage msg = new FacesMessage(message,"");
        msg.setSeverity(FacesMessage.SEVERITY_INFO);
        FacesContext.getCurrentInstance().addMessage(null, msg);

    }
}
